﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="typecount.aspx.cs" Inherits="admin_typecount" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat ="server">
    
    <title>无标题文档</title>
    <script type ="text/javascript" src ="../Scripts/WdatePicker.js" language="javascript"></script>
    <style type="text/css">
        <!
        -- body
        {
            margin-left: 0px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
        }
        .STYLE1
        {
            font-size: 12px;
        }
        .STYLE3
        {
            font-size: 12px;
            font-weight: bold;
        }
        .STYLE4
        {
            color: #03515d;
            font-size: 12px;
        }
        -- ></style>

    <script>
        var highlightcolor = '#c1ebff';
        //此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
        var clickcolor = '#51b2f6';
        function changeto() {
            source = event.srcElement;
            if (source.tagName == "TR" || source.tagName == "TABLE")
                return;
            while (source.tagName != "TD")
                source = source.parentElement;
            source = source.parentElement;
            cs = source.children;
            //alert(cs.length);
            if (cs[1].style.backgroundColor != highlightcolor && source.id != "nc" && cs[1].style.backgroundColor != clickcolor)
                for (i = 0; i < cs.length; i++) {
                cs[i].style.backgroundColor = highlightcolor;
            }
        }

        function changeback() {
            if (event.fromElement.contains(event.toElement) || source.contains(event.toElement) || source.id == "nc")
                return
            if (event.toElement != source && cs[1].style.backgroundColor != clickcolor)
            //source.style.backgroundColor=originalcolor
                for (i = 0; i < cs.length; i++) {
                cs[i].style.backgroundColor = "";
            }
        }

        function clickto() {
            source = event.srcElement;
            if (source.tagName == "TR" || source.tagName == "TABLE")
                return;
            while (source.tagName != "TD")
                source = source.parentElement;
            source = source.parentElement;
            cs = source.children;
            //alert(cs.length);
            if (cs[1].style.backgroundColor != clickcolor && source.id != "nc")
                for (i = 0; i < cs.length; i++) {
                cs[i].style.backgroundColor = clickcolor;
            }
            else
                for (i = 0; i < cs.length; i++) {
                cs[i].style.backgroundColor = "";
            }
        }
    </script>

</head>
<body>
<form id ="from1" runat ="server">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td height="30" background="images/tab_05.gif">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="12" height="30">
                            <img src="images/tab_03.gif" width="12" height="30" />
                        </td>
                        <td>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="46%" valign="middle">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td width="5%">
                                                    <div align="center">
                                                        <img src="images/tb.gif" width="16" height="16" /></div>
                                                </td>
                                                <td width="95%" class="STYLE1">
                                                    <span class="STYLE3">你当前的位置</span>：数据分类查看
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td width="54%">
                                       
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td width="16">
                            <img src="images/tab_07.gif" width="16" height="30" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="10%" align="right">
                            数据统计选项:
                        </td>
                        <td width="30%" align="left">
                            <asp:DropDownList ID="ddl" runat="server" Width="200" AutoPostBack="true" OnSelectedIndexChanged="ddl_Changed">
                                <asp:ListItem Text="请选择" Value="-1"></asp:ListItem>
                                <asp:ListItem Text="日营业额" Value="0"></asp:ListItem>
                                <asp:ListItem Text="本月营业额" Value="1"></asp:ListItem>
                                <asp:ListItem Text="本年度营业额" Value="2"></asp:ListItem>
                                <asp:ListItem Text="全部营业额" Value="3"></asp:ListItem>
                                <asp:ListItem Text="选择其他" Value="4"></asp:ListItem>
                            </asp:DropDownList>
                          
                        </td>
                        <td align="left">
                            <asp:Button ID="btnje" Text="统计" runat="server" Width="120" OnClick="btnje_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan ="3">
                              <asp:Panel ID="dpl" runat="server" Visible="false">
                                <asp:Label ID="lbl_Date" runat="server" Text="请选择时间:"></asp:Label>从<asp:TextBox ID="txt_Date"
                                    runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true})"></asp:TextBox>到
                                <asp:TextBox ID="to" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true})"></asp:TextBox></asp:Panel>
                        </td>
                    </tr>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="8" background="images/tab_12.gif">
                            &nbsp;
                        </td>
                        <td>
                            <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6" onmouseover="changeto()"
                                onmouseout="changeback()">
                                <tr>
                                    
                                    <td width="10%" height="22" background="images/bg.gif" bgcolor="#FFFFFF">
                                        <div align="center">
                                            <span class="STYLE1">成员类型</span></div>
                                    </td>
                                     <td width="14%" height="22" background="images/bg.gif" bgcolor="#FFFFFF">
                                        <div align="center">
                                            <span class="STYLE1">刷卡次数</span></div>
                                    </td>
                                    <td width="12%" height="22" background="images/bg.gif" bgcolor="#FFFFFF">
                                        <div align="center">
                                            <span class="STYLE1">总额</span></div>
                                    </td>
                                    <td width="14%" height="22" background="images/bg.gif" bgcolor="#FFFFFF">
                                        <div align="center">
                                            <span class="STYLE1">平均额</span></div>
                                    </td>
                                   
                                   
                                </tr>
                                <asp:Repeater ID ="tpcnt" runat ='server'>
                                <ItemTemplate>
                                
                                <tr>
                                    
                                    <td height="20" bgcolor="#FFFFFF">
                                        <div align="center" class="STYLE1">
                                            <div align="center">
                                                <%#GetTypestr (Eval ("ctype").ToString ()) %></div>
                                        </div>
                                    </td>
                                    <td height="20" bgcolor="#FFFFFF">
                                        <div align="center">
                                            <span class="STYLE1"><%#Eval("cnt") %></span></div>
                                    </td>
                                    <td height="20" bgcolor="#FFFFFF">
                                        <div align="center">
                                            <span class="STYLE1"><%#Eval("sm") %></span>
                                        </div>
                                    </td>
                                    <td height="20" bgcolor="#FFFFFF">
                                        <div align="center">
                                            <span class="STYLE1"><%#Eval("vg") %> </span>
                                        </div>
                                    </td>
                                </tr>
                            
                             </ItemTemplate>
                                </asp:Repeater>
                            </table>
                        </td>
                        <td width="8" background="images/tab_15.gif">
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td height="35" background="images/tab_19.gif">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="12" height="35">
                            <img src="images/tab_18.gif" width="12" height="35" />
                        </td>
                        <td align ="left">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                             <tr>
                                    <td align ="right">
                                       老人人数:
                                    </td>
                                    <td align ="left">
                                         <asp:Label ID ="lao" runat ="server"></asp:Label>
                                    </td>
                                </tr>
                                 <tr>
                                    <td align ="right">
                                       成人人数:
                                    </td>
                                    <td align ="left">
                                         <asp:Label ID ="cheng" runat ="server"></asp:Label>
                                    </td>
                                </tr>
                                 <tr>
                                    <td align ="right">
                                        学生人数:
                                    </td>
                                    <td align ="left">
                                         <asp:Label ID ="xs" runat ="server"></asp:Label>
                                    </td>
                                </tr>
                              <tr>
                                    <td align ="right">
                                       花费总金额:
                                    </td>
                                    <td align ="left">
                                         <asp:Label ID ="day" runat ="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td align ="right">
                                        全部花费总金额:
                                    </td>
                                    <td align ="left">
                                         <asp:Label ID ="cntsum" runat ="server"></asp:Label>
                                    </td>
                                </tr>
                                  <tr>
                                    <td align ="right">
                                        乘客充值总金额:
                                    </td>
                                    <td align ="left">
                                         <asp:Label ID ="cus" runat ="server"></asp:Label>
                                    </td>
                                </tr>

                            </table>
                        </td>
                        <td width="16">
                            <img src="images/tab_20.gif" width="16" height="35" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
